// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router/index'//使用路由

import './assets/public.css'

// import less from 'less'//使用less做适配
// Vue.use(less)
// import './assets/less/style.less' //全局使用


//内容穿透路径文件
import pathUrl from "./path/path.js"
Vue.prototype.pathUrl=pathUrl;


import 'amfe-flexible'//做适配


Vue.config.productionTip = false

import ElementUI from 'element-ui';//使用饿了么UI
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

// 使用axios
import axios from 'axios'
import VueAxios from 'vue-axios'
Vue.use(VueAxios, axios)
Vue.prototype.$axios = axios//设置为全局

//使用vuex
import Vuex from 'vuex'
Vue.use(Vuex)
import store from './store/index.js'//使用vuex

/**
 * 代码高亮
 * 参考：https://blog.csdn.net/tomwildboar/article/details/84453688
 */
Vue.directive('highlight',function (el) {
  let blocks = el.querySelectorAll('pre code');
  blocks.forEach((block)=>{
      hljs.highlightBlock(block)
  })
})
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,//使用vuex文件
  components: { App },
  template: '<App/>'
})
